package com.tencent.liteav.demo.play.bean;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * @author huling
 * @date: 2018/12/3.
 */
public class BaseEvent<T> {

    private int code;
    //事件名称
    private String name;
    //事件数据内容
    private String conent;

    private T extra;

    public BaseEvent(){}

    public BaseEvent(int code , String name , String content , T extra ){
        this.code = code;
        this.name = name;
        this.conent = content;
        this.extra = extra;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public String getConent() {
        return conent;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setConent(String conent) {
        this.conent = conent;
    }

    public T getExtra() {
        return extra;
    }

    public void setExtra(T extra) {
        this.extra = extra;
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface EventCodeContains{
        int GET_BIND_NEW_PHONE = 1;
        int CLOSE_LOGIN_PAGE = 2;
        int REFRESH_MAIN_CLASS_CIRCLE = 3;

        int REFRESH_PLAY_INFO = 4;
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface EventNameContains{

        String GET_BIND_NEW_PHONE = "GET_BIND_NEW_PHONE";
        String CLOSE_LOGIN_PAGE = "CLOSE_LOGIN_PAGE";
        String REFRESH_MAIN_CLASS_CIRCLE = "REFRESH_MAIN_CLASS_CIRCLE";

        String REFRESH_PLAY_INFO = "REFRESH_PLAY_INFO";
    }
}